home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / man / man-part1 / cat4 / obscont.4 < prev    next >
Text File  |  1999-09-16  |  2KB  |  133 lines

  1.  
  2.  
  3.  
  4. obscont(1)                     Scilab Function                     obscont(1)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. NAME
  12.   obscont - observer based controller
  13.  
  14. CALLING SEQUENCE
  15.   [K]=obscont(P,Kc,Kf)
  16.   [J,r]=obscont(P,Kc,Kf)
  17.  
  18. PARAMETERS
  19.  
  20.   P         : syslin list (nominal plant) in state-space form, continuous or
  21.             discrete time
  22.  
  23.   Kc        : real matrix, (full state) controller gain
  24.  
  25.   Kf        : real matrix, filter gain
  26.  
  27.   K         : syslin list (controller)
  28.  
  29.   J         : syslin list (extended controller)
  30.  
  31.   r         : 1x2 row vector
  32.  
  33. DESCRIPTION
  34.   obscont  returns the observer-based controller associated with a nominal
  35.   plant P with matrices [A,B,C,D] (syslin list).
  36.  
  37.   The full-state control gain is Kc and the filter gain is Kf.  These gains
  38.   can be computed, for example, by pole placement.
  39.  
  40.   A+B*Kc and A+Kf*C are (usually) assumed stable.
  41.  
  42.   K is a state-space representation of the compensator  K: y->u  in:
  43.  
  44.    xdot = A x + B u,  y=C x + D u, zdot= (A + Kf C)z -Kf y +B u, u=Kc z
  45.  
  46.   K is a linear system (syslin list) with matrices given by:
  47.    K=[A+B*Kc+Kf*C+Kf*D*Kc,Kf,-Kc].
  48.  
  49.   The closed loop feedback system  Cl: v ->y  with (negative) feedback K
  50.   (i.e. y = P u, u = v - K y, or xdot = A x + B u, y = C x + D u, zdot = (A +
  51.   Kf C) z - Kf y + B u, u = v -F z) is given by Cl = P/.(-K)
  52.  
  53.   The poles of Cl ( spec(cl(2)) ) are located at the eigenvalues of A+B*Kc
  54.   and A+Kf*C.
  55.  
  56.   Invoked with two output arguments obscont returns a (square) linear system
  57.   K which parametrizes all the stabilizing feedbacks via a LFT.
  58.  
  59.   Let Q an arbitrary stable linear system of dimension r(2)xr(1) i.e. number
  60.   of inputs x number of outputs in P.  Then any stabilizing controller K for
  61.   P can be expressed as K=lft(J,r,Q). The controller which corresponds to Q=0
  62.   is K=J(1:nu,1:ny) (this K is returned by K=obscont(P,Kc,Kf)).  r is size(P)
  63.   i.e the vector [number of outputs, number of inputs];
  64.  
  65.  
  66.  
  67. EXAMPLE
  68.   ny=2;nu=3;nx=4;P=ssrand(ny,nu,nx);[A,B,C,D]=abcd(P);
  69.   Kc=-ppol(A,B,[-1,-1,-1,-1]);Kf=-ppol(A',C',[-2,-2,-2,-2]);Kf=Kf';
  70.   cl=P/.(-obscont(P,Kc,Kf));spec(cl(2))
  71.   [J,r]=obscont(P,Kc,Kf);
  72.   Q=ssrand(nu,ny,3);Q(2)=Q(2)-(maxi(real(spec(Q(2))))+0.5)*eye(Q(2))
  73.   //Q is a stable parameter
  74.   K=lft(J,r,Q);
  75.   spec(h_cl(P,K))  // closed-loop A matrix (should be stable);
  76.  
  77. SEE ALSO
  78.   ppol, lqg, lqr, lqe, h_inf, lft, syslin, feedback, observer
  79.  
  80. AUTHOR
  81.   F.D.
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.